<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>JSDoc: Class: Api</title>

    <script src="scripts/prettify/prettify.js"> </script>
    <script src="scripts/prettify/lang-css.js"> </script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>

<body>

<div id="main">

    <h1 class="page-title">Class: Api</h1>

    




<section>

<header>
    
        <h2><span class="attribs"><span class="type-signature"></span></span>Api<span class="signature">(element)</span><span class="type-signature"></span></h2>
        
    
</header>

<article>
    <div class="container-overview">
    
        

    

    
    <h4 class="name" id="Api"><span class="type-signature"></span>new Api<span class="signature">(element)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Class representing the jwplayer() API.
Creates an instance of the player.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>element</code></td>
            

            <td class="type">
            
                
<span class="param-type">HTMLElement</span>


            
            </td>

            

            

            <td class="description last"><p>The element that will be replaced by the player's div container.</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


















    
    </div>

    

    

    

    

    

    

    
        <h3 class="subsection-title">Members</h3>

        
            
<h4 class="name" id="_"><span class="type-signature">(readonly) </span>_<span class="type-signature"></span></h4>




<div class="description">
    <p>Returns the Underscore module from the player instance.
Used by plugins.</p>
</div>







<dl class="details">

    

    

    

    

    

    

    

    
        <dt class="important tag-deprecated">Deprecated:</dt><dd><ul class="dummy"><li><p>TODO: in version 8.0.0-0</p></li></ul></dd>
    

    

    

    

    

    

    

    

    
</dl>






        
            
<h4 class="name" id="_events"><span class="type-signature">(readonly) </span>_events<span class="type-signature"> :object</span></h4>




<div class="description">
    <p>A map of event listeners.</p>
</div>



    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">object</span>


        </li>
    </ul>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>






        
            
<h4 class="name" id="_qoe"><span class="type-signature">(readonly) </span>_qoe<span class="type-signature"> :<a href="Timer.html">Timer</a></span></h4>




<div class="description">
    <p>The internal QoE Timer.</p>
</div>



    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type"><a href="Timer.html">Timer</a></span>


        </li>
    </ul>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>






        
            
<h4 class="name" id="Events"><span class="type-signature">(readonly) </span>Events<span class="type-signature"></span></h4>




<div class="description">
    <p>Returns the Events module from the player instance.
Used by plugins to listen to player events.</p>
</div>







<dl class="details">

    

    

    

    

    

    

    

    
        <dt class="important tag-deprecated">Deprecated:</dt><dd><ul class="dummy"><li><p>TODO: in version 8.0.0-0</p></li></ul></dd>
    

    

    

    

    

    

    

    

    
</dl>






        
            
<h4 class="name" id="id"><span class="type-signature">(readonly) </span>id<span class="type-signature"> :string</span></h4>




<div class="description">
    <p>The player's query id.
This matches the id of the element used to create the player at the time is was setup.</p>
</div>



    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">string</span>


        </li>
    </ul>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>






        
            
<h4 class="name" id="plugins"><span class="type-signature">(readonly) </span>plugins<span class="type-signature"> :object</span></h4>




<div class="description">
    <p>A map of plugin instances.</p>
</div>



    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">object</span>


        </li>
    </ul>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>






        
            
<h4 class="name" id="uniqueId"><span class="type-signature">(readonly) </span>uniqueId<span class="type-signature"> :number</span></h4>




<div class="description">
    <p>The player's unique id.</p>
</div>



    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">number</span>


        </li>
    </ul>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>






        
            
<h4 class="name" id="utils"><span class="type-signature">(readonly) </span>utils<span class="type-signature"></span></h4>




<div class="description">
    <p>Returns the Utils module from the player instance.
Used by plugins.</p>
</div>







<dl class="details">

    

    

    

    

    

    

    

    
        <dt class="important tag-deprecated">Deprecated:</dt><dd><ul class="dummy"><li><p>TODO: in version 8.0.0-0</p></li></ul></dd>
    

    

    

    

    

    

    

    

    
</dl>






        
            
<h4 class="name" id="version"><span class="type-signature">(readonly) </span>version<span class="type-signature"> :string</span></h4>






    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">string</span>


        </li>
    </ul>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>






        
    

    
        <h3 class="subsection-title">Methods</h3>

        
            

    

    
    <h4 class="name" id="addButton"><span class="type-signature"></span>addButton<span class="signature">(img, tooltip, callback, id, btnClass<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {<a href="Api.html">Api</a>}</span></h4>
    

    



<div class="description">
    <p>Adds or updates a button in the player's control bar. The button is only displayed when controls are active.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>img</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>The image that will be used as the button icon.
            Can be the url to an image or the content of an SVG in string.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>tooltip</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>A tooltip label to display when the button is hovered.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>A callback to invoke when the button is clicked.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>id</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>The id of the button to add or update.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>btnClass</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>CSS classes to add to the button element.</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The Player API instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Api.html">Api</a></span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="addPlugin"><span class="type-signature"></span>addPlugin<span class="signature">(name, pluginInstance)</span><span class="type-signature"> &rarr; {void}</span></h4>
    

    



<div class="description">
    <p>Adds a plugin instance to the player's instance.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>name</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            

            

            <td class="description last"><p>The name of the plugin.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>pluginInstance</code></td>
            

            <td class="type">
            
                
<span class="param-type">any</span>


            
            </td>

            

            

            <td class="description last"><p>The plugin instance.</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">void</span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="attachMedia"><span class="type-signature"></span>attachMedia<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="Api.html">Api</a>}</span></h4>
    

    



<div class="description">
    <p>Reattaches a player instance to it's underlying video tag.</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    
        <dt class="important tag-deprecated">Deprecated:</dt><dd class="yes-def tag-deprecated"><ul class="dummy"><li>Yes</li></ul></dd>
    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The Player API instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Api.html">Api</a></span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="castToggle"><span class="type-signature"></span>castToggle<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="Api.html">Api</a>}</span></h4>
    

    



<div class="description">
    <p>Toggles the presence of the Airplay button in Safari (calls <code>HTMLMediaElement.webkitShowPlaybackTargetPicker</code>).
Does not affect the Chromecast button in Chrome.</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The Player API instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Api.html">Api</a></span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="createInstream"><span class="type-signature"></span>createInstream<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="InstreamAdapter.html">InstreamAdapter</a>}</span></h4>
    

    



<div class="description">
    <p>Creates a new instance of the instream adapter. If present, the previous instance created is destroyed first.</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The instream instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="InstreamAdapter.html">InstreamAdapter</a></span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="detachMedia"><span class="type-signature"></span>detachMedia<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="Api.html">Api</a>}</span></h4>
    

    



<div class="description">
    <p>Detaches a player instance from it's underlying video tag.
Used to stop recording state changes before an ad break begins.</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    
        <dt class="important tag-deprecated">Deprecated:</dt><dd class="yes-def tag-deprecated"><ul class="dummy"><li>Yes</li></ul></dd>
    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The Player API instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Api.html">Api</a></span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="getAdBlock"><span class="type-signature"></span>getAdBlock<span class="signature">()</span><span class="type-signature"> &rarr; {boolean}</span></h4>
    

    



<div class="description">
    <p>Checks for the presence of an ad blocker. Implemented by jwplayer-commercial.</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>Was an ad blocker is detected?</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">boolean</span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="getAudioTracks"><span class="type-signature"></span>getAudioTracks<span class="signature">()</span><span class="type-signature"> &rarr; {Array.&lt;<a href="global.html#AudioTrackOption">AudioTrackOption</a>>}</span></h4>
    

    



<div class="description">
    <p>Gets the list of available audio tracks.</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>An array of AudioTrackOption objects representing the current media's audio tracks.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Array.&lt;<a href="global.html#AudioTrackOption">AudioTrackOption</a>></span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="getBuffer"><span class="type-signature"></span>getBuffer<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h4>
    

    



<div class="description">
    <p>Gets the percentage of the media's duration which has been buffered.</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>A number from 0-100 indicating the percentage of media buffered.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">number</span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="getCaptions"><span class="type-signature"></span>getCaptions<span class="signature">()</span><span class="type-signature"> &rarr; {object}</span></h4>
    

    



<div class="description">
    <p>Gets the captions style.</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The captions styling configuration</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">object</span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="getCaptionsList"><span class="type-signature"></span>getCaptionsList<span class="signature">()</span><span class="type-signature"> &rarr; {Array.&lt;<a href="global.html#CaptionsTrackOption">CaptionsTrackOption</a>>}</span></h4>
    

    



<div class="description">
    <p>Gets the list of available captions tracks.
The first item in the array will always be the &quot;off&quot; option, regardless of whether the media contains captions.</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>An array of CaptionsTrackOption objects.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Array.&lt;<a href="global.html#CaptionsTrackOption">CaptionsTrackOption</a>></span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="getConfig"><span class="type-signature"></span>getConfig<span class="signature">()</span><span class="type-signature"> &rarr; {object}</span></h4>
    

    



<div class="description">
    <p>Gets a static representation of the player's model.</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>A copy of the player model.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">object</span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="getContainer"><span class="type-signature"></span>getContainer<span class="signature">()</span><span class="type-signature"> &rarr; {HTMLElement}</span></h4>
    

    



<div class="description">
    <p>Gets the player's top level DOM element.</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The player's div container.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">HTMLElement</span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="getControls"><span class="type-signature"></span>getControls<span class="signature">()</span><span class="type-signature"> &rarr; {boolean}</span></h4>
    

    



<div class="description">
    <p>Gets whether or not controls are enabled.</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>Are controls enabled?</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">boolean</span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="getCurrentAudioTrack"><span class="type-signature"></span>getCurrentAudioTrack<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h4>
    

    



<div class="description">
    <p>Gets the index of the active audio track.</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The index of the active audio track, or -1 if there are no alternative audio tracks.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">number</span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="getCurrentCaptions"><span class="type-signature"></span>getCurrentCaptions<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h4>
    

    



<div class="description">
    <p>Gets the index of the active captions selection.</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The index of the active selection option, or 0 if captions are off.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">number</span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="getCurrentQuality"><span class="type-signature"></span>getCurrentQuality<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h4>
    

    



<div class="description">
    <p>Gets the index of the active quality selection.</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The index of the active quality level.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">number</span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="getCurrentTime"><span class="type-signature"></span>getCurrentTime<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h4>
    

    



<div class="description">
    <p>Gets the current value for video.currentTime</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The value for video.currentTime in seconds</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">number</span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="getDuration"><span class="type-signature"></span>getDuration<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h4>
    

    



<div class="description">
    <p>Gets the duration of the current playlist item.</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The duration in seconds.
Live streams always return <code>Infinity</code>.
DVR streams return a negative value, indicating how far back playback is from the live edge.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">number</span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="getEnvironment"><span class="type-signature"></span>getEnvironment<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="global.html#Environment">Environment</a>}</span></h4>
    

    



<div class="description">
    <p>Gets information about the current session's environment</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>An object detailing the current session's browser, operating system, and supported features.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="global.html#Environment">Environment</a></span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="getFullscreen"><span class="type-signature"></span>getFullscreen<span class="signature">()</span><span class="type-signature"> &rarr; {boolean}</span></h4>
    

    



<div class="description">
    <p>Gets the player's fullscreen state.</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>Whether or not the player is in fullscreen mode.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">boolean</span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="getHeight"><span class="type-signature"></span>getHeight<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h4>
    

    



<div class="description">
    <p>Gets the player's height.</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The height of the player in pixels.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">number</span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="getItemMeta"><span class="type-signature"></span>getItemMeta<span class="signature">()</span><span class="type-signature"> &rarr; {object}</span></h4>
    

    



<div class="description">
    <p>Gets all metadata for the current playlist item.</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The merged result of the current playlist item's &quot;meta&quot; events.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">object</span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="getMute"><span class="type-signature"></span>getMute<span class="signature">()</span><span class="type-signature"> &rarr; {boolean}</span></h4>
    

    



<div class="description">
    <p>Gets the player's mute state.</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>Whether or not the player is muted.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">boolean</span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="getPlaybackRate"><span class="type-signature"></span>getPlaybackRate<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h4>
    

    



<div class="description">
    <p>Gets the rate at which playback should occur while media is playing.</p>
</div>













<dl class="details">

    

    
    <dt class="tag-since">Since:</dt>
    <dd class="tag-since"><ul class="dummy"><li>v7.12.0</li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-default">Default Value:</dt>
    <dd class="tag-default"><ul class="dummy">
            <li>1.0</li>
        </ul></dd>
    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The playback rate of the media element (<code>HTMLMediaElement.playbackRate</code>).</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">number</span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="getPlaylist"><span class="type-signature"></span>getPlaylist<span class="signature">()</span><span class="type-signature"> &rarr; {Array.&lt;<a href="global.html#PlaylistItem">PlaylistItem</a>>}</span></h4>
    

    



<div class="description">
    <p>Gets the player's playlist.</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>An array of PlaylistItem objects.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Array.&lt;<a href="global.html#PlaylistItem">PlaylistItem</a>></span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="getPlaylistIndex"><span class="type-signature"></span>getPlaylistIndex<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h4>
    

    



<div class="description">
    <p>Gets the index of the current playlist item.</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The index of the current playlist item.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">number</span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="getPlaylistItem"><span class="type-signature"></span>getPlaylistItem<span class="signature">(index<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {<a href="global.html#PlaylistItem">PlaylistItem</a>|null}</span></h4>
    

    



<div class="description">
    <p>Gets the current playlist item, or the item specified by <code>index</code>.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>index</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>A 0-based index of the desired playlist item.</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>Returns <code>null</code> when <code>index</code> is out of range.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="global.html#PlaylistItem">PlaylistItem</a></span>
|

<span class="param-type">null</span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="getPlugin"><span class="type-signature"></span>getPlugin<span class="signature">(name)</span><span class="type-signature"> &rarr; {any}</span></h4>
    

    



<div class="description">
    <p>Gets the specified plugin instance.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>name</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            

            

            <td class="description last"><p>The name of the plugin.</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The plugin instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">any</span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="getPosition"><span class="type-signature"></span>getPosition<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h4>
    

    



<div class="description">
    <p>Gets the current playback time of the active media item.</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The current playback time in seconds.
Live streams return the number of seconds played relative to when playback started (not since the live stream started).
DVR streams return a negative value, indicating how far playback is from the live edge.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">number</span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="getProvider"><span class="type-signature"></span>getProvider<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="global.html#ProviderInfo">ProviderInfo</a>}</span></h4>
    

    



<div class="description">
    <p>Gets information about how the player is handling playback.</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>An object containing the name of the current playback provider.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="global.html#ProviderInfo">ProviderInfo</a></span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="getQualityLevels"><span class="type-signature"></span>getQualityLevels<span class="signature">()</span><span class="type-signature"> &rarr; {Array.&lt;<a href="global.html#QualityOption">QualityOption</a>>}</span></h4>
    

    



<div class="description">
    <p>Gets the list of available quality options.</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>An array of QualityOption objects.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Array.&lt;<a href="global.html#QualityOption">QualityOption</a>></span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="getSafeRegion"><span class="type-signature"></span>getSafeRegion<span class="signature">(excludeControlbar<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {<a href="global.html#SafeRegion">SafeRegion</a>}</span></h4>
    

    



<div class="description">
    <p>Gets the area of the player not obscured by controls.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>excludeControlbar</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>When set to false, the safe region will not exclude
the area used by the controlbar.</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The SafeRegion calculated using the player's current width, height
and controlbar when not excluded.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="global.html#SafeRegion">SafeRegion</a></span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="getState"><span class="type-signature"></span>getState<span class="signature">()</span><span class="type-signature"> &rarr; {'idle'|'buffering'|'playing'|'paused'|'complete'}</span></h4>
    

    



<div class="description">
    <p>Gets the player state.</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The current state of the player.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">'idle'</span>
|

<span class="param-type">'buffering'</span>
|

<span class="param-type">'playing'</span>
|

<span class="param-type">'paused'</span>
|

<span class="param-type">'complete'</span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="getStretching"><span class="type-signature"></span>getStretching<span class="signature">()</span><span class="type-signature"> &rarr; {'uniform'|'exactfit'|'fill'|'none'}</span></h4>
    

    



<div class="description">
    <p>Gets the mode of stretching used to fit media in the player.</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The current stretch mode.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">'uniform'</span>
|

<span class="param-type">'exactfit'</span>
|

<span class="param-type">'fill'</span>
|

<span class="param-type">'none'</span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="getViewable"><span class="type-signature"></span>getViewable<span class="signature">()</span><span class="type-signature"> &rarr; {1|0}</span></h4>
    

    



<div class="description">
    <p>Gets the player's viewability.</p>
</div>













<dl class="details">

    

    
    <dt class="tag-since">Since:</dt>
    <dd class="tag-since"><ul class="dummy"><li>v7.10.0</li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>Returns <code>1</code> when more than half the player is in the document viewport and the page's tab is active.
Also returns <code>1</code> when the player is in fullscreen mode. <code>0</code> otherwise.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">1</span>
|

<span class="param-type">0</span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="getVisualQuality"><span class="type-signature"></span>getVisualQuality<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="global.html#VisualQuality">VisualQuality</a>}</span></h4>
    

    



<div class="description">
    <p>Gets information about the visual quality of the active media.</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The last VisualQuality object returned for the current playlist item.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="global.html#VisualQuality">VisualQuality</a></span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="getVolume"><span class="type-signature"></span>getVolume<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h4>
    

    



<div class="description">
    <p>Gets the player's volume level.</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>A number from 0-100.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">number</span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="getWidth"><span class="type-signature"></span>getWidth<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h4>
    

    



<div class="description">
    <p>Gets the player's width.</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The width of the player in pixels.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">number</span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="isBeforeComplete"><span class="type-signature"></span>isBeforeComplete<span class="signature">()</span><span class="type-signature"> &rarr; {boolean}</span></h4>
    

    



<div class="description">
    <p>Checks if the player has finished playing the current playlist item,
but has not yet triggered the &quot;complete&quot; event or began the next item.
This state is entered when playing postroll ads.</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>Is the &quot;beforeComplete&quot; event being propagated or interrupted by instream?</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">boolean</span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="isBeforePlay"><span class="type-signature"></span>isBeforePlay<span class="signature">()</span><span class="type-signature"> &rarr; {boolean}</span></h4>
    

    



<div class="description">
    <p>Checks if playback has been requested, but not yet attempted.
This state is entered when playing preroll ads.</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>Is the &quot;beforePlay&quot; event being propagated or interrupted by instream?</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">boolean</span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="load"><span class="type-signature"></span>load<span class="signature">(toLoad, feedData<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {<a href="Api.html">Api</a>}</span></h4>
    

    



<div class="description">
    <p>Stop any active playback, and loads either a new playlist, a new playlist item,
or an item already in the current playlist.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>toLoad</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type">Array.&lt;<a href="global.html#PlaylistItem">PlaylistItem</a>></span>
|

<span class="param-type"><a href="global.html#PlaylistItem">PlaylistItem</a></span>
|

<span class="param-type">number</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>The feed url, playlist,
playlist item, or playlist item index to load.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>feedData</code></td>
            

            <td class="type">
            
                
<span class="param-type">object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>The feed data to associate with playlist items.
Only applied when passing in a playlist or playlist items.</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The Player API instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Api.html">Api</a></span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="next"><span class="type-signature"></span>next<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="Api.html">Api</a>}</span></h4>
    

    



<div class="description">
    <p>Stops any active playback, and plays the next up item specified by the related plugin.
The next up item is the next playlist item, or the first recommended video when at the end of the playlist.</p>
</div>













<dl class="details">

    

    
    <dt class="tag-since">Since:</dt>
    <dd class="tag-since"><ul class="dummy"><li>v7.7.0</li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The Player API instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Api.html">Api</a></span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="off"><span class="type-signature"></span>off<span class="signature">(name<span class="signature-attributes">opt</span>, callback<span class="signature-attributes">opt</span>, context<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {<a href="Api.html">Api</a>}</span></h4>
    

    



<div class="description">
    <p>Removes one or more callbacks.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>name</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>The event name. If null, all bound callbacks for all events will be removed.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>If null, all callbacks for the event will be removed.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>context</code></td>
            

            <td class="type">
            
                
<span class="param-type">any</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>If null, all callbacks with that function will be removed.</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The Player API instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Api.html">Api</a></span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="on"><span class="type-signature"></span>on<span class="signature">(name, callback, context<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {<a href="Api.html">Api</a>}</span></h4>
    

    



<div class="description">
    <p>Adds an event listener.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>name</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>The event name. Passing &quot;all&quot; will bind the callback to all events.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>The event callback.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>context</code></td>
            

            <td class="type">
            
                
<span class="param-type">any</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>The context to apply to the callback's function invocation.</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The Player API instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Api.html">Api</a></span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="once"><span class="type-signature"></span>once<span class="signature">(name, callback, context<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {<a href="Api.html">Api</a>}</span></h4>
    

    



<div class="description">
    <p>Adds an event listener which is triggered at most once.
The listener is removed after the first call.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>name</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>The event name. Passing &quot;all&quot; will bind the callback to all events.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>The event callback.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>context</code></td>
            

            <td class="type">
            
                
<span class="param-type">any</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>The context to apply to the callback's function invocation.</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The Player API instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Api.html">Api</a></span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="pause"><span class="type-signature"></span>pause<span class="signature">(meta<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {<a href="Api.html">Api</a>}</span></h4>
    

    



<div class="description">
    <p>Pauses playback.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>meta</code></td>
            

            <td class="type">
            
                
<span class="param-type">object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>An optional argument used to specify cause.</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The Player API instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Api.html">Api</a></span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="pauseAd"><span class="type-signature"></span>pauseAd<span class="signature">(toggle)</span><span class="type-signature"> &rarr; {void}</span></h4>
    

    



<div class="description">
    <p>Pauses or toggles ad playback. Implemented by ad plugins.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>toggle</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>


            
            </td>

            

            

            <td class="description last"><p>Specifies whether ad playback should be paused or resumed.</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">void</span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="play"><span class="type-signature"></span>play<span class="signature">(meta<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {<a href="Api.html">Api</a>}</span></h4>
    

    



<div class="description">
    <p>Starts playback.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>meta</code></td>
            

            <td class="type">
            
                
<span class="param-type">object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>An optional argument used to specify cause.</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The Player API instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Api.html">Api</a></span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="playAd"><span class="type-signature"></span>playAd<span class="signature">(adBreak)</span><span class="type-signature"> &rarr; {void}</span></h4>
    

    



<div class="description">
    <p>Plays an ad. Implemented by ad plugins.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>adBreak</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type">Array</span>


            
            </td>

            

            

            <td class="description last"><p>The ad tag or waterfall array.</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">void</span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="playlistItem"><span class="type-signature"></span>playlistItem<span class="signature">(index, meta<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {<a href="Api.html">Api</a>}</span></h4>
    

    



<div class="description">
    <p>Stops any active playback, and plays the item at the 0-based index in the playlist.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>index</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>If outside the range of the playlist,
the value will be wrapped to the playlist length.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>meta</code></td>
            

            <td class="type">
            
                
<span class="param-type">object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>An optional argument used to specify cause.</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The Player API instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Api.html">Api</a></span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="playlistNext"><span class="type-signature"></span>playlistNext<span class="signature">(meta<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {<a href="Api.html">Api</a>}</span></h4>
    

    



<div class="description">
    <p>Stops any active playback, and plays the next item in the playlist.
When the player is at the end of the playlist, this will play the first playlist item.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>meta</code></td>
            

            <td class="type">
            
                
<span class="param-type">object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>An optional argument used to specify cause.</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The Player API instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Api.html">Api</a></span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="playlistPrev"><span class="type-signature"></span>playlistPrev<span class="signature">(meta<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {<a href="Api.html">Api</a>}</span></h4>
    

    



<div class="description">
    <p>Stops any active playback, and plays the previous item in the playlist.
When the player is at the beginning of the playlist, this will play the last playlist item.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>meta</code></td>
            

            <td class="type">
            
                
<span class="param-type">object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>An optional argument used to specify cause.</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The Player API instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Api.html">Api</a></span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="playToggle"><span class="type-signature"></span>playToggle<span class="signature">(meta<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {<a href="Api.html">Api</a>}</span></h4>
    

    



<div class="description">
    <p>Toggles playback between play and pause.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>meta</code></td>
            

            <td class="type">
            
                
<span class="param-type">object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>An optional argument used to specify cause.</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The Player API instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Api.html">Api</a></span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="qoe"><span class="type-signature"></span>qoe<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="global.html#PlayerQoE">PlayerQoE</a>}</span></h4>
    

    



<div class="description">
    <p>Gets the QoE properties of the player and current playlist item.</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>An object containing a snapshot of QoE metrics.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="global.html#PlayerQoE">PlayerQoE</a></span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="registerPlugin"><span class="type-signature"></span>registerPlugin<span class="signature">(name, minimumVersion, pluginClass)</span><span class="type-signature"> &rarr; {void}</span></h4>
    

    



<div class="description">
    <p>Registers a plugin class with the player library.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>name</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            

            

            <td class="description last"><p>The name of the plugin.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>minimumVersion</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            

            

            <td class="description last"><p>The minimum player version required by the plugin.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>pluginClass</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            

            

            <td class="description last"><p>The plugin function or class to instantiate with new player instances.</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">void</span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="remove"><span class="type-signature"></span>remove<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="Api.html">Api</a>}</span></h4>
    

    



<div class="description">
    <p>Asynchronously removes the player from the page.
A &quot;remove&quot; event is fired once removal begins.
Playback is stopped, and the DOM used by the player is reset.
All event listeners attached to the player are removed.</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The Player API instance</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Api.html">Api</a></span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="removeButton"><span class="type-signature"></span>removeButton<span class="signature">(id)</span><span class="type-signature"> &rarr; {<a href="Api.html">Api</a>}</span></h4>
    

    



<div class="description">
    <p>Removes a button from the player's control bar.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>id</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            

            

            <td class="description last"><p>The id of the button to remove.</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The Player API instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Api.html">Api</a></span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="resize"><span class="type-signature"></span>resize<span class="signature">(width, height<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {<a href="Api.html">Api</a>}</span></h4>
    

    



<div class="description">
    <p>Sets the player width and height.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>width</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>
|

<span class="param-type">string</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>Set the width in pixel (number) or CSS measurement units ('100%', '100em')</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>height</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>
|

<span class="param-type">string</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>Set the height in pixel (number) or CSS measurement units ('100%', '100em')
When specified, the &quot;aspectratio&quot; option included at setup is cleared.</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The Player API instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Api.html">Api</a></span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="seek"><span class="type-signature"></span>seek<span class="signature">(position, meta<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {<a href="Api.html">Api</a>}</span></h4>
    

    



<div class="description">
    <p>Seeks to a specific time within the active media. Resumes playback if the player is paused.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>position</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>The time to seek to.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>meta</code></td>
            

            <td class="type">
            
                
<span class="param-type">object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>An optional argument used to specify cause.</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The Player API instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Api.html">Api</a></span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="setCaptions"><span class="type-signature"></span>setCaptions<span class="signature">(captionsStyles)</span><span class="type-signature"> &rarr; {<a href="Api.html">Api</a>}</span></h4>
    

    



<div class="description">
    <p>Sets captions styles.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>captionsStyles</code></td>
            

            <td class="type">
            
                
<span class="param-type">object</span>


            
            </td>

            

            

            <td class="description last"><p>The captions styling configuration to apply.</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    
    <dt class="tag-since">Since:</dt>
    <dd class="tag-since"><ul class="dummy"><li>v7.5.0</li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The Player API instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Api.html">Api</a></span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="setConfig"><span class="type-signature"></span>setConfig<span class="signature">(options)</span><span class="type-signature"> &rarr; {<a href="Api.html">Api</a>}</span></h4>
    

    



<div class="description">
    <p>Updates the player's config options.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">object</span>


            
            </td>

            

            

            <td class="description last"><p>The configuration options to update.</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    
    <dt class="tag-since">Since:</dt>
    <dd class="tag-since"><ul class="dummy"><li>v7.12.0</li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The Player API instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Api.html">Api</a></span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="setControls"><span class="type-signature"></span>setControls<span class="signature">(toggle<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {<a href="Api.html">Api</a>}</span></h4>
    

    



<div class="description">
    <p>Toggles player controls.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>toggle</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>Specifies whether controls should be enabled or disabled.</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The Player API instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Api.html">Api</a></span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="setCues"><span class="type-signature"></span>setCues<span class="signature">(sliderCues)</span><span class="type-signature"> &rarr; {<a href="Api.html">Api</a>}</span></h4>
    

    



<div class="description">
    <p>Sets the list of cues to be displayed on the time slider.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>sliderCues</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="global.html#SliderCue">SliderCue</a>></span>


            
            </td>

            

            

            <td class="description last"><p>The list of cues.</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The Player API instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Api.html">Api</a></span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="setCurrentAudioTrack"><span class="type-signature"></span>setCurrentAudioTrack<span class="signature">(index)</span><span class="type-signature"> &rarr; {void}</span></h4>
    

    



<div class="description">
    <p>Sets the active audio track.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>index</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last"><p>The index of the audio track to select.</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">void</span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="setCurrentCaptions"><span class="type-signature"></span>setCurrentCaptions<span class="signature">(index)</span><span class="type-signature"> &rarr; {void}</span></h4>
    

    



<div class="description">
    <p>Sets the active captions option.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>index</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last"><p>The index of the captions option to select.</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">void</span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="setCurrentQuality"><span class="type-signature"></span>setCurrentQuality<span class="signature">(index)</span><span class="type-signature"> &rarr; {void}</span></h4>
    

    



<div class="description">
    <p>Sets the active quality option.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>index</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last"><p>The index of the quality level to select.</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">void</span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="setFullscreen"><span class="type-signature"></span>setFullscreen<span class="signature">(toggle<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {<a href="Api.html">Api</a>}</span></h4>
    

    



<div class="description">
    <p>Toggles fullscreen state. Most browsers require a user gesture to trigger entering fullscreen mode.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>toggle</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>Specifies whether to enter or exit fullscreen mode.</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The Player API instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Api.html">Api</a></span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="setMute"><span class="type-signature"></span>setMute<span class="signature">(toggle<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {<a href="Api.html">Api</a>}</span></h4>
    

    



<div class="description">
    <p>Toggles the player's mute state.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>toggle</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>Specifies whether to mute or unmute the player.</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The Player API instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Api.html">Api</a></span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="setPlaybackRate"><span class="type-signature"></span>setPlaybackRate<span class="signature">(playbackRate)</span><span class="type-signature"> &rarr; {<a href="Api.html">Api</a>}</span></h4>
    

    



<div class="description">
    <p>Sets the player's default playeback rate. During playback, the rate of the current media will be set immediately if supported. Not supported when streaming live.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>playbackRate</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last"><p>The desired rate of playback. Limited to numbers between 0.25-4.0.</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    
    <dt class="tag-since">Since:</dt>
    <dd class="tag-since"><ul class="dummy"><li>v7.12.0</li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The Player API instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Api.html">Api</a></span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="setup"><span class="type-signature"></span>setup<span class="signature">(options)</span><span class="type-signature"> &rarr; {<a href="Api.html">Api</a>}</span></h4>
    

    



<div class="description">
    <p>Creates a new player on the page and asynchronously begins setup.
A &quot;ready&quot; event is triggered on success.
A &quot;setupError&quot; event is triggered on failure.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">object</span>


            
            </td>

            

            

            <td class="description last"><p>The player configuration options.</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The Player API instance</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Api.html">Api</a></span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="setVolume"><span class="type-signature"></span>setVolume<span class="signature">(level)</span><span class="type-signature"> &rarr; {<a href="Api.html">Api</a>}</span></h4>
    

    



<div class="description">
    <p>Set the player's volume level.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>level</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last"><p>A value from 0-100.</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The Player API instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Api.html">Api</a></span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="skipAd"><span class="type-signature"></span>skipAd<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="Api.html">Api</a>}</span></h4>
    

    



<div class="description">
    <p>Calls <code>skipAd</code> on the active instream adapter instance if present.</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The Player API instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Api.html">Api</a></span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="stop"><span class="type-signature"></span>stop<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="Api.html">Api</a>}</span></h4>
    

    



<div class="description">
    <p>Stops any active playback.</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The Player API instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Api.html">Api</a></span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="trigger"><span class="type-signature"></span>trigger<span class="signature">(name, args<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {<a href="Api.html">Api</a>}</span></h4>
    

    



<div class="description">
    <p>Triggers one or more events.
By default, the player will invoke callbacks inside a try-catch block to prevent exceptions from breaking normal player behavior.
To disable this safety measure set <code>jwplayer.debug</code> to <code>true</code>.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>name</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>The event name.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>args</code></td>
            

            <td class="type">
            
                
<span class="param-type">object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>An object containing the event properties.</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The Player API instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Api.html">Api</a></span>


    </dd>
</dl>

    





        
    

    

    
</article>

</section>




</div>

<nav>
    <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Api.html">Api</a></li><li><a href="BackgroundMedia.html">BackgroundMedia</a></li><li><a href="InstreamAdapter.html">InstreamAdapter</a></li><li><a href="PlayerError.html">PlayerError</a></li><li><a href="Timer.html">Timer</a></li></ul><h3>Global</h3><ul><li><a href="global.html#ERROR_LOADING_PLAYLIST">ERROR_LOADING_PLAYLIST</a></li><li><a href="global.html#ERROR_LOADING_PLAYLIST_ITEM">ERROR_LOADING_PLAYLIST_ITEM</a></li><li><a href="global.html#ERROR_LOADING_PROVIDER">ERROR_LOADING_PROVIDER</a></li><li><a href="global.html#FLASH_ERROR">FLASH_ERROR</a></li><li><a href="global.html#FLASH_MEDIA_ERROR">FLASH_MEDIA_ERROR</a></li><li><a href="global.html#FLASH_SETUP_ERROR">FLASH_SETUP_ERROR</a></li><li><a href="global.html#HTML5_BASE_MEDIA_ERROR">HTML5_BASE_MEDIA_ERROR</a></li><li><a href="global.html#HTML5_ERROR_LIVE_STREAM_DOWN_OR_ENDED">HTML5_ERROR_LIVE_STREAM_DOWN_OR_ENDED</a></li><li><a href="global.html#HTML5_NETWORK_ERROR">HTML5_NETWORK_ERROR</a></li><li><a href="global.html#jwplayer">jwplayer</a></li><li><a href="global.html#load">load</a></li><li><a href="global.html#SETUP_ERROR_LICENSE_EXPIRED">SETUP_ERROR_LICENSE_EXPIRED</a></li><li><a href="global.html#SETUP_ERROR_LICENSE_INVALID">SETUP_ERROR_LICENSE_INVALID</a></li><li><a href="global.html#SETUP_ERROR_LICENSE_MISSING">SETUP_ERROR_LICENSE_MISSING</a></li><li><a href="global.html#SETUP_ERROR_LOADING_CORE_JS">SETUP_ERROR_LOADING_CORE_JS</a></li><li><a href="global.html#SETUP_ERROR_LOADING_PLAYLIST">SETUP_ERROR_LOADING_PLAYLIST</a></li><li><a href="global.html#SETUP_ERROR_LOADING_PROVIDER">SETUP_ERROR_LOADING_PROVIDER</a></li><li><a href="global.html#SETUP_ERROR_TIMEOUT">SETUP_ERROR_TIMEOUT</a></li><li><a href="global.html#SETUP_ERROR_UNKNOWN">SETUP_ERROR_UNKNOWN</a></li></ul>
</nav>

<br class="clear">

<footer>
    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
</footer>

<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>